package com.itheima.web;

import com.itheima.config.SpringConfig;
import com.itheima.service.AccountService;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;

/**
 * Description:
 *
 * @author codermao
 * @date 2023/11/3 21:27
 */
//spring整合junit
@RunWith(SpringJUnit4ClassRunner.class)
//加载注解配置类
@ContextConfiguration(classes = SpringConfig.class)
public class MyApp {
    //TODO：代理对象（从ioc容器中）
    @Autowired
    AccountService service;
//    AccountServiceClass service;
    @Test
    public void test01(){
//        System.out.println(service);
        System.out.println(service.getClass());
        //配置对insert方法具有增强效果
        service.insert("参数");
    }
}
